<?php  

/**
* 
*/
abstract class AbstractBean
{
    public function __get($name){
        $methodName = 'get'.ucfirst($name);
        
        if(method_exists($this, $methodName)){
            return $this->{$methodName}();
        }
        
        throw new Exception('Bean Exception: no sutch property '.$name);
    }
    
    
    public function set __name($name, $value){
        $methodName = 'set'.ucfirst($name);
        
        if(method_exists($this, $methodName)){
            return $this->{$methodName}($value);
        }
        
        throw new Exception('Bean Exception: no sutch property '.$name);
    }
}


?>